package com.ktg.mes.chanjet.config;

import com.chanjet.openapi.sdk.java.ChanjetClient;
import com.chanjet.openapi.sdk.java.DefaultChanjetClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 初始化畅捷通SDK client
 */
@Configuration
public class ChanjetClientConfig {


    @Bean
    public ChanjetClient chanjetClient(OpenApiConfig openApiConfig){
        return new DefaultChanjetClient(openApiConfig.getGatewayUrl(), openApiConfig.getSecret());
    }
}
